﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="message_teacher.aspx.cs" Inherits="message_teacher" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>教师收到的消息</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <CENTER>
        <br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Sno" HeaderText="Sno" SortExpression="Sno" />
                <asp:BoundField DataField="Sname" HeaderText="Sname" SortExpression="Sname" />
                <asp:BoundField DataField="Cno" HeaderText="Cno" SortExpression="Cno" />
                <asp:BoundField DataField="Cname" HeaderText="Cname" SortExpression="Cname" />
                <asp:BoundField DataField="message" HeaderText="message" SortExpression="message" />
                <asp:HyperLinkField DataNavigateUrlFields="Sno,Cno" DataNavigateUrlFormatString="send_message_to_student.aspx?Sno={0}&amp;Cno={1}" HeaderText="回复" Text="回复" />
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
        </asp:GridView>
        </CENTER>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:XSXKConnectionString4 %>" SelectCommand="SELECT Message_to_teacher.Sno,Student.Sname,Message_to_teacher.Cno,Course.Cname,Message_to_teacher.message
FROM Message_to_teacher,Student,Course
where Message_to_teacher.Tno=@Tno and Message_to_teacher.Sno=Student.Sno and Message_to_teacher.Cno=Course.Cno">
            <SelectParameters>
                <asp:SessionParameter Name="Tno" SessionField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
